1. Technology Field
The present invention relates to a method, a memory storage apparatus and a memory controller for transmitting and identifying data streams, and particularly, to a method, a memory storage apparatus and a memory controller thereof suitable for managing the data stream transmitting between the host system and the memory storage apparatus.
2. Description of Related Art
Along with the widespread of digital cameras, cell phones, and MP3 in recently years, the consumers' demand for storage media has increased drastically. Since a rewritable non-volatile memory is characterized by non-volatility of data, low power consumption, small volume, non-mechanical structure, and fast reading and writing speed, the rewritable non-volatile memory is the most adaptable memory to be applied in a portable electronic product, e.g., a notebook computer. A solid state drive (SSD) is a storage apparatus which utilizes a flash memory as its storage medium. Therefore, the flash memory industry has become a very popular part of the electronic industry in recent years.
Furthermore, the user's increasing acceptance of electronic wallet and pre-deposit lead to the popularity of smart cards. A smart card is typically an integrated circuit (IC) chip which includes, for example, a microprocessor, a card operation system, a security module, and a memory module to allow holder of the smart card to perform preset operations. With the ability to provide computation, encryption, bidirectional communication and security functions, the smart card not only records data but also protects the recorded data therein. One exemplary application of the smart card is the subscriber identification module (SIM) of cellular phones that use global system for mobile communication (GSM). However, the smart card has a limit on the storage capacity. Thus, the smart card has recently begun to be combined with a memory card to expand the storage capacity of the smart card.
In the conventional technology, the combination of the flash memory and the smart card uses special commands to distinguish between data transmitted to the smart card and data transmitted to the flash memory. Such special commands may result in the problem that hardware devices or driver programs are unable to support the special commands. In addition, in the conventional technology, type information of the data stream transmitted in the special commands is compared to determine whether the data stream is of the command format of the smart card. However, this method often results in confusion of command data of the smart card with regular file data (i.e., misinterpreting regular file data as data stream of the smart card).
In addition, in applications of electronic products with cache memory, due to the electronic products' own limits, data stream transmitting between the smart card and the electronic products can not bypass the cache memory, preventing a response generated by the smart card from being transmitted without error back to the electronic product that the smart card is attached to and thereby restraining adoption of the smart card on such electronic product having cache memory. For example, in a cell phone with a Java system, since the Java system does not support commands such as Non Cache which allow direct access to non-volatile memory without using cache memory, it is difficult to combine the smart card and the flash memory into a memory card to be adopted in the cell phone with the Java system. FIG. 1 is a functional block diagram of a prior art of a host system 10 equipped with a memory card 12. The host is a type of electronic product (e.g., a cell phone with a Java system) and has a cache memory 14. The memory card 12 includes a flash memory 16 and a smart card chip 18. All data between the host system 10 and the memory card 12 is transmitted through the cache memory 14. However, since the cache memory 14 temporarily records recent data transmitted between the host system 10 and the memory card 12, when the host system 10 acquires data from the smart card chip 18, if the cache memory 14 already contains data matched with the address designated by the read command, the cache memory 14 will transmit the matched data to the host system 10. However, under such structure, the response from the smart card chip 18 is often substituted by the data already in the cache memory 14 and thus the encryption function and communication security offered by the smart card chip 18 are compromised.
Therefore, a system and a method that can accurately transmit the response message of the smart card are required in the relevant combined utilization of the flash memory and the smart card.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.